cleaned up win32 detection vs plug-in compilation specifics, added
authorØyvind Kolås <ok@src.gnome.org>
Fri, 15 Feb 2008 21:24:13 +0000 (21:24 +0000)
committerØyvind Kolås <ok@src.gnome.org>
Fri, 15 Feb 2008 21:24:13 +0000 (21:24 +0000)
* configure.ac: cleaned up win32 detection vs plug-in compilation
specifics, added DYNAMICLIB paramter for gcc which defaults to -shared
for win32 and -dynamiclib for darwin.
* extensions/Makefile.am: use $(DYNAMICLIB) instead of -shared.

svn path=/trunk/; revision=278

ChangeLog
configure.ac
extensions/Makefile.am

index 6ba1b87402629e7da52d5e45c4b5a4108c95f3d5..c6e5a666b181f69acfb474d5f546370f26d8bdf9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-02-15  Øyvind Kolås  <pippin@gimp.org>
+
+       * configure.ac: cleaned up win32 detection vs plug-in compilation
+       specifics, added DYNAMICLIB paramter for gcc which defaults to -shared
+       for win32 and -dynamiclib for darwin.
+       * extensions/Makefile.am: use $(DYNAMICLIB) instead of -shared.
+
 2008-02-11  Kevin Cozens  <kcozens@cvs.gnome.org>
 
        * configure.ac: Set shrext to ".dylib" for Darwin (ie. Mac OS).
index 3c1ed862a53f391b9d1630c5d39fa0c6d6229bcc..2dbbb9b267e725f5c3d7fa3c0d9a93fd9bccaf81 100644 (file)
@@ -155,23 +155,47 @@ case "$target_or_host" in
 esac
 
 
+####################################################
+# Check how to generate plug-ins (with gcc at least)
+####################################################
+
+AC_MSG_CHECKING([for some Win32 platform])
+case "$target_or_host" in 
+  *-*-darwin*)                 # darwin
+    shrext=.dylib
+    dynamiclib=-dynamiclib
+    ;;
+  *-*-mingw* | *-*-cygwin*)    # windows
+    shrext=.dll
+    dynamiclib=-shared
+    ;;
+  *)                           # linux (and BSD?)
+    dynamiclib=-shared
+    shrext=.so
+    ;;
+esac
+
+SHREXT=$shrext
+AC_SUBST(SHREXT)
+AC_DEFINE_UNQUOTED(SHREXT,     "$shrext",     [File extension for shared libraries])
+
+DYNAMICLIB=$dynamiclib
+AC_SUBST(DYNAMICLIB)
+AC_DEFINE_UNQUOTED(DYNAMICLIB, "$dynamiclib", [Dynamic shared library])
+
+dnl ===========================================================================
+
 #################
 # Check for Win32
 #################
 
 AC_MSG_CHECKING([for some Win32 platform])
 case "$target_or_host" in 
-  *-*-darwin*)
-    platform_win32=no
-    shrext=.dylib
-    ;;
   *-*-mingw* | *-*-cygwin*)
     platform_win32=yes
-    shrext=.dll
     ;;
   *)
     platform_win32=no
-    shrext=.so
     ;;
 esac
 AC_MSG_RESULT([$platform_win32])
@@ -214,15 +238,6 @@ AC_DEFINE_UNQUOTED(BABL_DIR_SEPARATOR, "$DIR_SEP", [separator between directorie
 
 AC_DEFINE_UNQUOTED(BABL_LIBRARY, "$PACKAGE_NAME-$BABL_API_VERSION", [name of BABL library])
 
-#####################################
-# File extension for shared libraries
-#####################################
-
-SHREXT=$shrext
-AC_SUBST(SHREXT)
-AC_DEFINE_UNQUOTED(SHREXT, "$shrext", [File extension for shared libraries])
-
-dnl ===========================================================================
 
 
 dnl ===========================================================================
index e546d7e42a1aded6cd8f1f100a14d46f19638e9b..ca995f051b3ae1a588e5c1681a0448c0874320b2 100644 (file)
@@ -19,7 +19,7 @@ CFLAGS += \
        -I $(top_srcdir)/extensions     \
        -fPIC
 
-LDFLAGS += -shared
+LDFLAGS += $(DYNAMICLIB)
 
 if OS_WIN32
 LDADD    = $(no-undefined) $(libbabldlla) $(MATH_LIB)